import { Routes, Route } from 'react-router-dom';
import Homepage from './pages/homepage';
import Login from './pages/login';

function App () {

  const [counter, setCounter] = useState(0);
  const [is, setIs] = useLogin();

  // reactive

  // const fn = useCallback(function () {
  //   console.log(counter);
  // }, [counter]);

  // function fn () {
  //   console.log(counter);
  // }

  // (() => {
  //   console.log(counter);
  // })()

  // useMemo(() => {
  //   console.log(counter);
  // }, [counter]);

  // useMemo(() => {
  //   function fn () {

  //   }
  //   return (<div>{ counter }</div>);
  // }, [counter]);

  // memoiz

  return (
    <Routes>
      <Route path="/" element={ <Homepage /> } />
      <Route path="/login" element={ <Login /> } />
    </Routes>
  );
}
